<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        background-color: #333;
      }

      .box,
      .container {
        width: 200px;
        height: 200px;
        background-color: #f77;
      }

      .container {
        /* 生成了一个新图层 */
        position: fixed;
        background-color: #eee;
        transition: all 1s ease;
      }

      .container:hover {
        transform: translateX(100px);
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
    <div class="container"></div>
    <script></script>
  </body>
</html>
